libxl: fix vif.ifname when used with stub device model.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 24 Jul 2012 09:29:17 +0000 (10:29 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 24 Jul 2012 09:29:17 +0000 (10:29 +0100)
commitfd7687a4a5dfe5d6030ea3ace4f79dd2e7bcf838
tree0f308816fbf3ae126cc38c8c846b44c5647bb73a
parenta7889bdd566f1dd1f98d755118c80784aeda71c6
libxl: fix vif.ifname when used with stub device model.

Currently the same libxl_device_nic is used to create both the HVM domain and
its stub domain's NICs. This means that if a vifname is provided both the HVM
domains PV NIC and the stub domains PV NIC will get the same name and the
DM's NIC will fail to be attached.

Instead launder the libxl_device_nic to add the TAP_DEVICE_SUFFIX ("-emu").
This is a bit of a misnomer, since the device is actually PV, but it is used to
"back" the emulated device in the stub domain and this naming scheme is
consistent with the non-stub case and is known to work e.g. with our hotplug
scripts.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_dm.c